<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../react18/react.development.js"></script>
    <script src="../react18/react-dom.development.js"></script>
    <script src="../react18/babel.min.js"></script>
</head>

<body>
    <div id="app"> </div>
    <script type="text/babel">
        /*
        jsx语法2:
          - 指定样式的类名必须用className,指定for的属性要用htmlfor(避免与关键字发生冲突)
          - 在书写style行内样式的时候,需接收一个对象格式的样式,而对象是js语句,所以需要在js环境{}中
          - 不规则的命名需要用驼峰
        */
       const vDOM = (
        <div className="outer">
            <h1>JSX</h1>
            <p style={{color:"red",fontSize:"80px"}}>JSX贼方便</p>
            <p className="active" htmlFor="form">今天的天气真热啊</p>
        </div>
       )
       
       ReactDOM.createRoot(document.getElementById("app")).render(vDOM)
    </script>
</body>

</html>